package 集合框架.LinkedList源码探究;

import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2021-12-30 15:38
 **/
public class TestLinkedList {
    public static void main(String[] args) {
        List<Integer> linkedList = new LinkedList<>(Arrays.asList(1,2,3,4,5));
        linkedList.addAll(4,Arrays.asList(0,0,0));
        linkedList.forEach(System.out::print);
        System.out.println();
        linkedList.remove(2);
        linkedList.forEach(System.out::print);
    }
}
